<?php
class Australian_Validate_Phone extends Zend_Validate_Abstract{
	
	const INVALID = 'inValid';
	
	protected $_messageTemplates = array(
			self::INVALID => "So phone khong dung theo yeu cau",
	);
	
// 	public function __construct($password){
// 		$this->_password = $password;
// 	}
	
	public function isValid($value){
		$pattern = '#^084-[0-9]{2}-[0-9]{2}\.[0-9]{6}$#';
		// Thay ham preg_match() cho ham ereg()
		if(preg_match($pattern,$value) != 1){
			$this->_error('inValid');
			return false;
		}
	
		return true;
	}
}